class ChatResponseDto {
  ChatResponseDto({
      String? model, 
      String? createdAt, 
      Message? message, 
      bool? done, 
      int? totalDuration, 
      int? loadDuration, 
      int? promptEvalCount, 
      int? promptEvalDuration, 
      int? evalCount, 
      int? evalDuration,}){
    _model = model;
    _createdAt = createdAt;
    _message = message;
    _done = done;
    _totalDuration = totalDuration;
    _loadDuration = loadDuration;
    _promptEvalCount = promptEvalCount;
    _promptEvalDuration = promptEvalDuration;
    _evalCount = evalCount;
    _evalDuration = evalDuration;
}

  ChatResponseDto.fromJson(dynamic json) {
    _model = json['model'];
    _createdAt = json['created_at'];
    _message = json['message'] != null ? Message.fromJson(json['message']) : null;
    _done = json['done'];
    _totalDuration = json['total_duration'];
    _loadDuration = json['load_duration'];
    _promptEvalCount = json['prompt_eval_count'];
    _promptEvalDuration = json['prompt_eval_duration'];
    _evalCount = json['eval_count'];
    _evalDuration = json['eval_duration'];
  }
  String? _model;
  String? _createdAt;
  Message? _message;
  bool? _done;
  int? _totalDuration;
  int? _loadDuration;
  int? _promptEvalCount;
  int? _promptEvalDuration;
  int? _evalCount;
  int? _evalDuration;

  String? get model => _model;
  String? get createdAt => _createdAt;
  Message? get message => _message;
  bool? get done => _done;
  int? get totalDuration => _totalDuration;
  int? get loadDuration => _loadDuration;
  int? get promptEvalCount => _promptEvalCount;
  int? get promptEvalDuration => _promptEvalDuration;
  int? get evalCount => _evalCount;
  int? get evalDuration => _evalDuration;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['model'] = _model;
    map['created_at'] = _createdAt;
    if (_message != null) {
      map['message'] = _message?.toJson();
    }
    map['done'] = _done;
    map['total_duration'] = _totalDuration;
    map['load_duration'] = _loadDuration;
    map['prompt_eval_count'] = _promptEvalCount;
    map['prompt_eval_duration'] = _promptEvalDuration;
    map['eval_count'] = _evalCount;
    map['eval_duration'] = _evalDuration;
    return map;
  }

}

class Message {
  Message({
      String? role, 
      String? content,}){
    _role = role;
    _content = content;
}

  Message.fromJson(dynamic json) {
    _role = json['role'];
    _content = json['content'];
  }
  String? _role;
  String? _content;

  String? get role => _role;
  String? get content => _content;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['role'] = _role;
    map['content'] = _content;
    return map;
  }

}